import java.util.Scanner;

public class jiecheng {
    public static void main(String args[]) {
        
        System.out.print("Enter the n to get n!: ");
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum1 = 1, sum2 = 1;
        int j = 1; 

        for (int i = 1; i < n + 1; i++) {
            sum1 *= i;
        }

        System.out.println("ForLoop: " + sum1);

        while (j < n + 1) {
            sum2 *= j;
            j++;
        }
        System.out.println("WhileLoop: " + sum2);
    }
}
